package com.sen.result;

/**
 * 状态码和返回信息的枚举类
 */
public enum ResultEnum {

    SUCCESS(200, "操作成功"),
    ERROR(400, "操作失败"),

    UNAUTHORIZED(401, "您暂未登录，请先登录"),
    FORBIDDEN(403, "您没有权限访问，请咨询管理员");



    private int code;
    private String msg;
    ResultEnum(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
